#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	double x;
	long long n;
	double sum=1;
	double r=1;
	cin>>x>>n;
	while(n--)
	{
		r*=x;
		sum+=r;
	
	}
	printf("%.2f",sum);
 } 
